Log bulk_check calls

Andrew Cantino 9 years ago
parent
commit
13df66cfb5
1 changed files with 3 additions and 1 deletions
  1. 3 1
      app/models/agent.rb

+ 3 - 1
app/models/agent.rb

@@ -416,7 +416,9 @@ class Agent < ActiveRecord::Base
416 416
     # per type of agent, so you can override this to define custom bulk check behavior for your custom Agent type.
417 417
     def bulk_check(schedule)
418 418
       raise "Call #bulk_check on the appropriate subclass of Agent" if self == Agent
419
-      where("agents.schedule = ? and disabled = false", schedule).pluck("agents.id").each do |agent_id|
419
+      agent_ids = where("agents.schedule = ? and disabled = false", schedule).pluck("agents.id")
420
+      Rails.logger.info "Calling bulk_check(#{schedule}) on #{agent_ids}"
421
+      agent_ids.each do |agent_id|
420 422
         async_check(agent_id)
421 423
       end
422 424
     end